home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / sun / volume3 / catcher / patch02 < prev    next >
Encoding:
Internet Message Format  |  1991-10-25  |  11.1 KB

  1. Path: uunet!seismo!dimacs.rutgers.edu!aramis.rutgers.edu!athos.rutgers.edu!mcgrew
  2. From: mcgrew@athos.rutgers.edu (Charles Mcgrew)
  3. Newsgroups: comp.sources.sun
  4. Subject: v03i009:  Catcher 1.0 patch2
  5. Message-ID: <Oct.25.12.17.52.1991.28437@athos.rutgers.edu>
  6. Date: 25 Oct 91 16:17:53 GMT
  7. Organization: Rutgers Univ., New Brunswick, N.J.
  8. Lines: 354
  9. Approved: mcgrew@aramis.rutgers.edu
  10.  
  11. Submitted-by: chuck@trantor.harris-atd.com
  12. Posting-number: Volume 3, Issue 9
  13. Archive-name: catcher/patch02
  14.  
  15.  
  16.  
  17.      This shar file contains patch 2 to catcher, bringing it to version
  18. 1.0b.
  19.  
  20.      This patch fixes a few minor bugs, including a problem with text
  21. field initialization, and enhances the Makefile somewhat.  Full details
  22. are in the README file.
  23.  
  24.      You'll need catcher 1.0a to apply this patch.
  25.  
  26.  
  27. Chuck Musciano                ARPA  : chuck@trantor.harris-atd.com
  28. Harris Corporation             Usenet: ...!uunet!x102a!trantor!chuck
  29. PO Box 37, MS 3A/1912            AT&T  : (407) 727-6131
  30. Melbourne, FL 32902            FAX   : (407) 729-3363
  31.  
  32. A good newspaper is never good enough,
  33.     but a lousy newspaper is a joy forever.        -- Garrison Keillor
  34.  
  35. #! /bin/sh
  36. # This is a shell archive.  Remove anything before this line, then unpack
  37. # it by saving it into a file and typing "sh file".  To overwrite existing
  38. # files, type "sh file -c".  You can also feed this as standard input via
  39. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  40. # will see the following message at the end:
  41. #        "End of shell archive."
  42. # Contents:  patch
  43. # Wrapped by chuck@pluto on Thu May 23 12:27:49 1991
  44. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  45. if test -f 'patch' -a "${1}" != "-c" ; then 
  46.   echo shar: Will not clobber existing file \"'patch'\"
  47. else
  48. echo shar: Extracting \"'patch'\" \(9101 characters\)
  49. sed "s/^X//" >'patch' <<'END_OF_FILE'
  50. X*** Makefile.orig    Thu May 23 12:19:50 1991
  51. X--- Makefile    Thu May 23 12:19:33 1991
  52. X***************
  53. X*** 15,27 ****
  54. X  LDFLAGS        = -L$(OPENWINHOME)/lib
  55. X  
  56. X  # Where your XView include files are installed
  57. X! CPPFLAGS    = -I$(OPENWINHOME)/include -DMAILER=\"$(MAILER)\"
  58. X  
  59. X  # Command to use to print the manual (must honor -P option to set printer)
  60. X  PRINT        = lpr
  61. X  
  62. X  # PostScript printer to use
  63. X! PRINTER        = lw
  64. X  
  65. X  CATCHER        = busy.o catcher.o execute.o load_icon.o misc.o option.o panel.o parse.o place_dialog.o process.o
  66. X  
  67. X--- 15,27 ----
  68. X  LDFLAGS        = -L$(OPENWINHOME)/lib
  69. X  
  70. X  # Where your XView include files are installed
  71. X! CPPFLAGS    = -I$(OPENWINHOME)/include
  72. X  
  73. X  # Command to use to print the manual (must honor -P option to set printer)
  74. X  PRINT        = lpr
  75. X  
  76. X  # PostScript printer to use
  77. X! PRINTER        = $${PRINTER:-lw}
  78. X  
  79. X  CATCHER        = busy.o catcher.o execute.o load_icon.o misc.o option.o panel.o parse.o place_dialog.o process.o
  80. X  
  81. X*** Imakefile.orig    Thu May 23 12:19:51 1991
  82. X--- Imakefile    Wed Jan 30 10:30:33 1991
  83. X***************
  84. X*** 5,17 ****
  85. X  PRINT        = lpr
  86. X  
  87. X  # PostScript printer to use
  88. X! PRINTER        = lw
  89. X  
  90. X  LOCAL_LIBRARIES = -lxview -lolgx $(XLIB)
  91. X  
  92. X  LDOPTIONS    = -L$(OPENWINHOME)/lib
  93. X  
  94. X! CFLAGS        = -O -I$(OPENWINHOME)/include
  95. X  
  96. X  SRCS        = busy.c catcher.c execute.c load_icon.c misc.c option.c panel.c parse.y place_dialog.c process.c
  97. X  
  98. X--- 5,21 ----
  99. X  PRINT        = lpr
  100. X  
  101. X  # PostScript printer to use
  102. X! PRINTER        = $${PRINTER:-lw}
  103. X  
  104. X+ ICON_PATH    = "\".:./icons:$(LIBDIR)/images:/usr/include/images\""
  105. X+ 
  106. X  LOCAL_LIBRARIES = -lxview -lolgx $(XLIB)
  107. X  
  108. X  LDOPTIONS    = -L$(OPENWINHOME)/lib
  109. X  
  110. X! INCLUDES    = -I$(OPENWINHOME)/include
  111. X! 
  112. X! DEFINES = -DICON_PATH=$(ICON_PATH)
  113. X  
  114. X  SRCS        = busy.c catcher.c execute.c load_icon.c misc.c option.c panel.c parse.y place_dialog.c process.c
  115. X  
  116. X*** README.orig    Thu May 23 12:19:52 1991
  117. X--- README    Thu May 23 12:04:29 1991
  118. X***************
  119. X*** 17,23 ****
  120. X  /*    without prior permission from Harris Corporation.         */
  121. X  /************************************************************************/
  122. X  
  123. X!      Catcher Version 1.0
  124. X       
  125. X       Catcher is a tool that allows you to build windowed tools that can
  126. X  catch drag and drop files dragged from other windowed tools.  Catcher
  127. X--- 17,23 ----
  128. X  /*    without prior permission from Harris Corporation.         */
  129. X  /************************************************************************/
  130. X  
  131. X!      Catcher Version 1.0b
  132. X       
  133. X       Catcher is a tool that allows you to build windowed tools that can
  134. X  catch drag and drop files dragged from other windowed tools.  Catcher
  135. X***************
  136. X*** 113,115 ****
  137. X--- 113,121 ----
  138. X                       Corrected bug in parser
  139. X                       Corrected handling of suffix string
  140. X                       Renamed ungetc to last_char in lex.c
  141. X+      
  142. X+          1.0b    23 May 91    Patch 2
  143. X+                      Enhanced Imakefile (thanks to Rainer Sinkwitz)
  144. X+                      Warp caret to parameter of selected choice
  145. X+                         (thanks to Rainer Sinkwitz)
  146. X+                      Fixed bug in text item init (J Q Johnson)
  147. X*** catcher.c.orig    Thu May 23 12:19:54 1991
  148. X--- catcher.c    Thu May 23 12:15:49 1991
  149. X***************
  150. X*** 178,183 ****
  151. X--- 178,184 ----
  152. X         exit(1);
  153. X  
  154. X      base = (Frame) xv_create(NULL, FRAME,
  155. X+                     XV_HEIGHT, 900,
  156. X                      FRAME_LABEL, config.label,
  157. X                      FRAME_SHOW_RESIZE_CORNER, FALSE,
  158. X                      FRAME_SHOW_FOOTER, config.message != NULL,
  159. X***************
  160. X*** 236,242 ****
  161. X  
  162. X  /* fix all the panel widths */
  163. X      for (w = 0, cmd = config.command; cmd; cmd = cmd->next) {
  164. X!        window_fit(cmd->panel);
  165. X         if (w < xv_get(cmd->panel, XV_WIDTH))
  166. X            w = (int) xv_get(cmd->panel, XV_WIDTH);
  167. X         }
  168. X--- 237,243 ----
  169. X  
  170. X  /* fix all the panel widths */
  171. X      for (w = 0, cmd = config.command; cmd; cmd = cmd->next) {
  172. X!        window_fit_width(cmd->panel);
  173. X         if (w < xv_get(cmd->panel, XV_WIDTH))
  174. X            w = (int) xv_get(cmd->panel, XV_WIDTH);
  175. X         }
  176. X*** load_icon.c.orig    Thu May 23 12:19:58 1991
  177. X--- load_icon.c    Thu May 23 11:59:02 1991
  178. X***************
  179. X*** 29,35 ****
  180. X  #define        ICON_PATH        ".:./icons:/usr/local/images:/usr/include/images"
  181. X  #endif
  182. X  
  183. X! PUBLIC    char    *getenv();
  184. X  
  185. X  /************************************************************************/
  186. X  EXPORT    Server_image    load_icon(path, message)
  187. X--- 29,35 ----
  188. X  #define        ICON_PATH        ".:./icons:/usr/local/images:/usr/include/images"
  189. X  #endif
  190. X  
  191. X! PUBLIC    char    *getenv(), *index();
  192. X  
  193. X  /************************************************************************/
  194. X  EXPORT    Server_image    load_icon(path, message)
  195. X*** misc.c.orig    Thu May 23 12:19:59 1991
  196. X--- misc.c    Fri May 17 09:15:00 1991
  197. X***************
  198. X*** 50,97 ****
  199. X  }
  200. X  
  201. X  /************************************************************************/
  202. X- PRIVATE    delarg(argc, argv)
  203. X- 
  204. X- int    *argc;
  205. X- char    **argv;
  206. X- 
  207. X- {    char    *p;
  208. X- 
  209. X-     while (*argv = *(argv+1))
  210. X-        argv++;
  211. X-     (*argc)--;
  212. X- }
  213. X- 
  214. X- /************************************************************************/
  215. X- EXPORT    char    getopt(argc, argv, opts, parm)
  216. X- 
  217. X- int    *argc;
  218. X- char    **argv;
  219. X- char    *opts;
  220. X- char    **parm;
  221. X- 
  222. X- {    char    c, *p, *index();
  223. X-     int    killed;
  224. X- 
  225. X-     *parm = NULL;
  226. X-     while (*argv && ((**argv != '-') || (*(*argv+1) == '\0')))
  227. X-        argv++;
  228. X-     if (*argv == NULL)
  229. X-        return(EOF);
  230. X-     c = *(*argv+1);
  231. X-     *++(*argv) = '-';
  232. X-     if (killed = (*(*argv+1) == '\0'))
  233. X-        delarg(argc, argv);
  234. X-     if ((p = index(opts, c)) == NULL)
  235. X-        c = '\0';
  236. X-     else if (*(p+1) == ':') {
  237. X-        *parm = killed ? *argv : *argv+1;
  238. X-        delarg(argc, argv);
  239. X-        }
  240. X-     return(c);
  241. X- }
  242. X- 
  243. X- /************************************************************************/
  244. X  EXPORT    int    is_empty(s)
  245. X  
  246. X  char    *s;
  247. X--- 50,55 ----
  248. X*** option.c.orig    Thu May 23 12:20:00 1991
  249. X--- option.c    Fri Mar 15 08:16:47 1991
  250. X***************
  251. X*** 31,36 ****
  252. X--- 31,38 ----
  253. X  #include    "manifest.h"
  254. X  #include    "catcher.h"
  255. X  
  256. X+ #define        PREVIOUS_VALUE        280006631
  257. X+ 
  258. X  /************************************************************************/
  259. X  PRIVATE    choice_toggle(item, value, event)
  260. X  
  261. X***************
  262. X*** 40,54 ****
  263. X  
  264. X  {    Option    *opt;
  265. X      Choice    *c;
  266. X!     int    i;
  267. X  
  268. X      opt = (Option *) xv_get(item, PANEL_CLIENT_DATA);
  269. X      for (i = 0, c = opt->choice; c; i++, c = c->next)
  270. X         if (c->item)
  271. X!           if (opt->type == OPT_EXCLUSIVE)
  272. X               xv_set(c->item, PANEL_INACTIVE, value != i, NULL);
  273. X!           else
  274. X               xv_set(c->item, PANEL_INACTIVE, !(value & (1 << i)), NULL);
  275. X  }
  276. X  
  277. X  /************************************************************************/
  278. X--- 42,69 ----
  279. X  
  280. X  {    Option    *opt;
  281. X      Choice    *c;
  282. X!     int    i, prev;
  283. X  
  284. X      opt = (Option *) xv_get(item, PANEL_CLIENT_DATA);
  285. X+     if (opt->type == OPT_NONEXCLUSIVE) {
  286. X+        prev = (int) xv_get(item, XV_KEY_DATA, PREVIOUS_VALUE);
  287. X+        prev ^= value;
  288. X+        if ((prev & value) == 0)
  289. X+           prev = 0;
  290. X+        xv_set(item, XV_KEY_DATA, PREVIOUS_VALUE, value, NULL);
  291. X+        }
  292. X      for (i = 0, c = opt->choice; c; i++, c = c->next)
  293. X         if (c->item)
  294. X!           if (opt->type == OPT_EXCLUSIVE) {
  295. X               xv_set(c->item, PANEL_INACTIVE, value != i, NULL);
  296. X!              if (value == i)
  297. X!                 xv_set(xv_get(c->item, XV_OWNER), PANEL_CARET_ITEM, c->item, NULL);
  298. X!              }
  299. X!           else {
  300. X               xv_set(c->item, PANEL_INACTIVE, !(value & (1 << i)), NULL);
  301. X+              if ((1 << i) & prev)
  302. X+                 xv_set(xv_get(c->item, XV_OWNER), PANEL_CARET_ITEM, c->item, NULL);
  303. X+              }
  304. X  }
  305. X  
  306. X  /************************************************************************/
  307. X***************
  308. X*** 118,123 ****
  309. X--- 133,139 ----
  310. X                              PANEL_LABEL_BOLD, TRUE,
  311. X                              PANEL_VALUE_DISPLAY_LENGTH, opt->text.length,
  312. X                              PANEL_VALUE_STORED_LENGTH, 10 * opt->text.length,
  313. X+                             PANEL_VALUE, opt->text.text_init? opt->text.text_init : "",
  314. X                              XV_X, X_MARGIN,
  315. X                              XV_Y, option_y,
  316. X                               NULL);
  317. X***************
  318. X*** 129,134 ****
  319. X--- 145,151 ----
  320. X                              PANEL_MAX_VALUE, opt->text.high,
  321. X                              PANEL_VALUE_DISPLAY_LENGTH, opt->text.length,
  322. X                              PANEL_VALUE_STORED_LENGTH, 10 * opt->text.length,
  323. X+                             PANEL_VALUE, opt->text.int_init,
  324. X                              XV_X, X_MARGIN,
  325. X                              XV_Y, option_y,
  326. X                               NULL);
  327. X***************
  328. X*** 145,150 ****
  329. X--- 162,169 ----
  330. X            if (c->parameter)
  331. X               create_text(panel, opt->item, i, c);
  332. X         xv_set(opt->item, PANEL_VALUE, val, NULL);
  333. X+        if (opt->type == OPT_NONEXCLUSIVE)
  334. X+           xv_set(opt->item, XV_KEY_DATA, PREVIOUS_VALUE, val, NULL);
  335. X         choice_toggle(opt->item, val, NULL);
  336. X         }
  337. X  }
  338. X*** patchlevel.h.orig    Thu May 23 12:20:02 1991
  339. X--- patchlevel.h    Thu May 23 11:46:46 1991
  340. X***************
  341. X*** 24,29 ****
  342. X  /*               comp.sources.x: Volume 11, Issues 6-10    */
  343. X  /*                                    */
  344. X  /*      1        Bug fixes; see README for details        */
  345. X! /*               comp.sources.x: Volume 11, Issue ?        */
  346. X  /*                                    */
  347. X  /************************************************************************/
  348. X--- 24,31 ----
  349. X  /*               comp.sources.x: Volume 11, Issues 6-10    */
  350. X  /*                                    */
  351. X  /*      1        Bug fixes; see README for details        */
  352. X! /*               comp.sources.x: Volume 11, Issue 76        */
  353. X! /*                                    */
  354. X! /*      2        Bug fixes; see README for details        */
  355. X  /*                                    */
  356. X  /************************************************************************/
  357. END_OF_FILE
  358. if test 9101 -ne `wc -c <'patch'`; then
  359.     echo shar: \"'patch'\" unpacked with wrong size!
  360. fi
  361. # end of 'patch'
  362. fi
  363. echo shar: End of shell archive.
  364. exit 0
  365.